import { connect } from 'react-redux';
import { changeInput, add_todo_item } from '../store/actionCreator';
import Input from '../component/input';

const mapStateToProps = (state) => {
    return {
        value:state.value
    }
}
const mapDispatchToProps = (dispatch, ownProps) => {
    return {
        handleInputChange: (value) => {
            dispatch(changeInput(value))
        },
        addTodoItem: () => {
            dispatch(add_todo_item())
        }
    }
}

const inputChange = connect(
    mapStateToProps,
    mapDispatchToProps
)(Input)

export default inputChange;